package com.bit.cfdi.web.dao.impl;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.bit.cfdi.web.dao.PedimentoAduanalDAO;
import com.bit.cfdi.web.domain.PedimentoAduanal;

@Repository
public class PedimentoAduanalDAOImpl extends HibernateDaoSupport implements PedimentoAduanalDAO{

	@Autowired
	public void init(final SessionFactory sessionFactory) {
		setSessionFactory(sessionFactory);
	}
	
	@Override
	@Transactional public void save(PedimentoAduanal pedimentoAduanal) throws DataAccessException {
		getHibernateTemplate().saveOrUpdate(pedimentoAduanal);
	}

}